//
//  RouterManager.m
//  Study
//
//  Created by 振兴 刘 on 2019/8/14.
//  Copyright © 2019 振兴 刘. All rights reserved.
//

#import "RouterManager.h"
#import <UIKit/UIKit.h>
#import <MGJRouter/MGJRouter.h>
#import "TestViewController.h"

@implementation RouterManager

+ (void)load {
    [MGJRouter registerURLPattern:@"Router://PushTestVC" toHandler:^(NSDictionary *routerParameters) {
        
        UINavigationController *navigationVC = routerParameters[MGJRouterParameterUserInfo][@"navigationVC"];
        UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
        TestViewController *controller = [storyboard instantiateViewControllerWithIdentifier:@"TestVC"];
        controller.params = @{@"uid": @(10)};
        controller.content = @"通过MGJRouter跳转";
        [navigationVC pushViewController:controller animated:YES];
    }];
}

@end
